.max_def <- function(x, ..., na.rm = FALSE) base::max(x, ..., na.rm = na.rm)
.min_def <- function(x, ..., na.rm = FALSE) base::min(x, ..., na.rm = na.rm)
.range_def <- function(x, ..., na.rm = FALSE) base::range(x, ..., na.rm = na.rm)
.prod_def <- function(x, ..., na.rm = FALSE) base::prod(x, ..., na.rm = na.rm)
.sum_def <- function(x, ..., na.rm = FALSE) base::sum(x, ..., na.rm = na.rm)
.any_def <- function(x, ..., na.rm = FALSE) base::any(x, ..., na.rm = na.rm)
.all_def <- function(x, ..., na.rm = FALSE) base::all(x, ..., na.rm = na.rm)

setGeneric("max", function(x, ..., na.rm = FALSE) standardGeneric("max"),
           useAsDefault = .max_def, group = "Summary")
setGeneric("min", function(x, ..., na.rm = FALSE) standardGeneric("min"),
           useAsDefault = .min_def, group="Summary")
setGeneric("range", function(x, ..., na.rm = FALSE) standardGeneric("range"),
           useAsDefault = .range_def, group="Summary")
setGeneric("prod", function(x, ..., na.rm = FALSE) standardGeneric("prod"),
           useAsDefault = .prod_def, group="Summary")
setGeneric("sum", function(x, ..., na.rm = FALSE) standardGeneric("sum"),
           useAsDefault = .sum_def, group="Summary")
setGeneric("any", function(x, ..., na.rm = FALSE) standardGeneric("any"),
           useAsDefault = .any_def, group="Summary")
setGeneric("all", function(x, ..., na.rm = FALSE) standardGeneric("all"),
           useAsDefault = .all_def, group="Summary")


setGeneric("numdim",     function(x) standardGeneric("numdim"))
setGeneric("spacing",     function(x) standardGeneric("spacing"))
setGeneric("bounds",     function(x) standardGeneric("bounds"))
setGeneric("orientation",  function(x) standardGeneric("orientation"))
setGeneric("origin", function(x) standardGeneric("origin"))
setGeneric("trans",  function(x) standardGeneric("trans"))
setGeneric("invTrans", function(x) standardGeneric("invTrans"))
setGeneric("trans<-", function(x, value) standardGeneric("trans<-"))



setGeneric("value",       function(object, x,y, ...) standardGeneric("value"))
setGeneric("valueNN",     function(object, x,y, ...) standardGeneric("valueNN"))

setGeneric("indexToVoxel",   function(x, idx) standardGeneric("indexToVoxel"))
setGeneric("voxelToIndex",   function(x, i, j, ...) standardGeneric("voxelToIndex"))


setGeneric("headerFile",     function(x) standardGeneric("headerFile"))
setGeneric("dataFile",     function(x) standardGeneric("dataFile"))
setGeneric("fileType",  function(x) standardGeneric("fileType"))
setGeneric("versionNum",  function(x) standardGeneric("versionNum"))
setGeneric("encoding",  function(x) standardGeneric("encoding"))
setGeneric("endian", function(this) standardGeneric("endian"))
setGeneric("voxelOffset", function(this) standardGeneric("voxelOffset"))
setGeneric("info", function(this) standardGeneric("info"))
setGeneric("dataType", function(this) standardGeneric("dataType"))
setGeneric("makeBrainSpace", function(this) standardGeneric("makeBrainSpace"))
